package com.xsoft.web.util;


import java.io.Serializable;


final public class Result implements Serializable {
	private static final long serialVersionUID = 1479533934025392748L;
	private Integer code;
    private String info;
    private Object data;

    public Result(Integer code, String info) {
		super();
		this.code = code;
		this.info = info;
	}


	public Result() {
    }


    public Result(Integer code) {
		super();
		this.code = code;
	}


	public Result(Integer code, String info, Object data) {
		super();
		this.code = code;
		this.info = info;
		this.data = data;
	}
	

	public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }


	public String getInfo() {
		return info;
	}


	public void setInfo(String info) {
		this.info = info;
	}
	
	
	//////////////////////
	
	int hashAccount(char[] account) 
	{
		int hash = 0;
		for(int i=0; i<account.length;  i++)
		{
			hash = 5 * hash + (int)account[i];  //Asics码 55920702
		}
		return hash;
	}
	
	
	public static void main(String[] args)
	{
								  	
		String s = "ryan_rls4"; //319695707
//		s = "ryan_test_999";    //260890134
		System.out.println(new Result().hashAccount(s.toCharArray()));
		
		System.out.println((int)'r');
		System.out.println((int)'y');
		System.out.println((int)'a');
		System.out.println((int)'n');
		System.out.println((int)'_');
		System.out.println((int)'r');
		System.out.println((int)'l');
		System.out.println((int)'s');
		System.out.println((int)'4');
		
		
	}


}
